package com.catsic.mod.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.catsic.base.BaseEntity;
import com.catsic.core.entity.User;
import com.catsic.pub.entity.Drawer;

/** 
 * ClassName: Announce
 * Description: 公告实体类
 * date: 2014年2月28日 上午10:34:00
 * author: zhoukai
 */
 
@Entity
@Table(name="S_ANNOUNCE")
public class Announces extends BaseEntity implements Serializable{

	/**
	 * serialVersionUID:serialVersionUID
	 */
	private static final long serialVersionUID = -8258941811024169809L;
	
	/**
	 * 通告ID
	 */
/*	@Id
    @GenericGenerator(name="systemUUID",strategy="uuid")
    @GeneratedValue(generator="systemUUID")    
    @Column(name="ID")
	private String id;*/
	
	/**
	 * 	公告标题
	 */
	@Column(name="TITLE")
	private String title;
	
	/**
	 * 公告内容
	 */
	@Column(name="CONTENT")
	private String content;
	
	/**
	 * 公告类型
	 */
	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	@JoinColumn(name = "TYPE", referencedColumnName = "ID")
	private Drawer drawer;
	/**
	 * 用户
	 */
	@ManyToOne(fetch = FetchType.LAZY, optional = false)
	@JoinColumn(name = "CREATEID", referencedColumnName = "ID")
	private User user;
	
	
	/**
	 * 接收机构ID
	 */
	@Column(name="ORGANID",length=4000,nullable=false)
	private String organId;
	
	
	/**
	 * 截止时间
	 */
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@Column(name="FINISHDATE")
	private Date finishDate;	
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Drawer getDrawer() {
		return drawer;
	}

	public void setDrawer(Drawer drawer) {
		this.drawer = drawer;
	}



	public Date getFinishDate() {
		return finishDate;
	}

	public void setFinishDate(Date finishDate) {
		this.finishDate = finishDate;
	}


	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getOrganId() {
		return organId;
	}

	public void setOrganId(String organId) {
		this.organId = organId;
	}
	
	

}